package entity;

import java.time.LocalTime;

public class FlightInfo implements Product, Comparable<FlightInfo> {
    private String name;
    private Double price;
    private String departure;
    private String destination;
    private LocalTime departureTime;
    private LocalTime arriveTime;
    private int seat;

    public FlightInfo(String name, Double price, String departure, String destination, LocalTime departureTime, LocalTime arriveTime, int seat) {
        this.name = name;
        this.price = price;
        this.departure = departure;
        this.destination = destination;
        this.departureTime = departureTime;
        this.arriveTime = arriveTime;
        this.seat = seat;
    }

    public FlightInfo(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public Double getPrice() {
        return price;
    }

    public String getDeparture() {
        return departure;
    }

    public String getDestination() {
        return destination;
    }

    public LocalTime getDepartureTime() {
        return departureTime;
    }

    public LocalTime getArriveTime() {
        return arriveTime;
    }

    public int getSeat() {
        return seat;
    }

    @Override
    public int compareTo(FlightInfo o) {
        return Double.compare(this.price, o.price);
    }
}
